package com.yanqu.road.entity.enums.mailsub;

import com.yanqu.road.entity.enums.eChannelType;

public enum eMailSubscribeType {

    TaiWan(eChannelType.TaiWan.getValue(), "https://eventsapi.gm99.com/external/collectState", 52, "港澳台接口地址"),

    Japan(eChannelType.Japan.getValue(), "https://geventsapi.37games.com/external/collectState", 209, "日本接口地址"),

    Korea(eChannelType.Korea.getValue(), "https://geventsapi.37games.com/external/collectState", 211, "韩国接口地址"),

    Thailand(eChannelType.Thailand.getValue(), "https://geventsapi.37games.com/external/collectState", 213, "国际接口地址"),

    US(eChannelType.US.getValue(), "https://geventsapi.37games.com/external/collectState", 213, "国际接口地址"),

    UK(eChannelType.UK.getValue(), "https://geventsapi.37games.com/external/collectState", 213, "国际接口地址"),

    VN(eChannelType.VN.getValue(), "https://geventsapi.37games.com/external/collectState", 215, "越南接口地址"),

    ;

    /*
     * 渠道 id
     */
    private int channelId;

    /*
     * 接口地址
     */
    private String url;
    /**
     * 游戏id
     */
    private int gameId;
    /**
     * 描述
     */
    private String desc;

    eMailSubscribeType(int channelId, String url, int gameId, String desc) {
        this.channelId = channelId;
        this.url = url;
        this.gameId = gameId;
        this.desc = desc;
    }

    public static eMailSubscribeType forNumber(int channelId) {
        for (eMailSubscribeType item : eMailSubscribeType.values()) {
            if (item.channelId == channelId) {
                return item;
            }
        }
        return null;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public int getGameId() {
        return gameId;
    }

    public void setGameId(int gameId) {
        this.gameId = gameId;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public int getChannelId() {
        return channelId;
    }

    public void setChannelId(int channelId) {
        this.channelId = channelId;
    }
}
